package com.zhang.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Objects;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "subject_article")
public class SubjectArticle{
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private String text;
    private String likes;
    private String picture;
    private String article;
    private String type;
    private String comment;
    private Integer articleId;
    
    public SubjectArticle(SubjectArticle subjectArticle) {
        if (Objects.nonNull(subjectArticle)) {
            this.id=subjectArticle.id;
            this.name=subjectArticle.name;
            this.text=subjectArticle.text;
            this.likes=subjectArticle.likes;
            this.picture=subjectArticle.picture;
            this.article=subjectArticle.article;
            this.type=subjectArticle.type;
            this.comment=subjectArticle.comment;
            this.articleId=subjectArticle.articleId;
        }
    }
}
